package io.esirong.image.media;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

import io.esirong.image.media.target.ContextTarget;

/**
 * @ClassName: AppMedia
 * @Description: 选择媒体文件的（图片，视频，音频）
 * @author: huangrongcai
 * @date: 2022/9/4
 */
public class AppMedia {

    public static void method() {
        AppMedia.with(null)
                .mediaType(Media.TYPE.IMAGE)
                .callback(new MediaResultListener() {
                    @Override
                    public void onResult(int requestCode, int resultCode, Intent data) {

                    }

                    @Override
                    public void onFailed(int code, Throwable e) {

                    }

                })
                .start();
    }

    /**
     * 显示一个交互界面，提供用户具体选择的操作
     *
     * @param activity {@link Activity}
     */
    public static void showSelector(Activity activity) {
    }

    public static Request with(Context context) {
        return new DefaultRequest(new ContextTarget(context));
    }

}
